<form action='{:url("save")}' method="post" data-auto="true" class="layui-form layui-card" data-table-id="EmployeeTable">
    <div class="layui-card-body padding-left-40">

        <label class="layui-form-item relative block">
            <span class="help-label"><b>公司</b></span>
            <select name="company_id" class="layui-select" required>
                <option value="">请选择公司</option>
                {volist name="companies" id="company"}
                <option value="{$company.id}" {if condition="isset($vo) && ($vo.company_id == $company.id) || $company_id == $company.id"}selected{/if}>{$company.name}</option>
                {/volist}
            </select>
        </label>

        <label class="layui-form-item relative block">
            <span class="help-label"><b>员工名称</b></span>
            <input maxlength="255" class="layui-input" name="name" value="{$vo.name|default=''}" required placeholder="请输入员工名称">
        </label>

        <label class="layui-form-item relative block">
            <span class="help-label"><b>车牌号</b></span>
            <input maxlength="255" class="layui-input" name="plate_number" value="{$vo.plate_number|default=''}" required placeholder="请输入车牌号">
        </label>

        <label class="layui-form-item relative block">
            <span class="help-label"><b>员工状态</b></span>
            <input type="radio" name="status" value="1" title="正常" {if condition="isset($vo) && $vo.status == 1"}checked{/if}>
            <input type="radio" name="status" value="0" title="禁用" {if condition="isset($vo) && $vo.status == 0"}checked{/if}>
        </label>

    </div>

    <div class="hr-line-dashed"></div>
    {notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
    <input type='hidden' name='company_id' value='{$company_id|default=""}'>

    <div class="layui-form-item text-center">
        <button class="layui-btn" type='submit'>保存数据</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>取消编辑</button>
    </div>
</form>
